package cc.rengu.redp.bizimpl.upmp.service;

import cc.rengu.redp.bizimpl.upmp.domain.UpmpPrivilegeCheck;
import cc.rengu.redp.bizimpl.upmp.domain.UpmpRole;
import cc.rengu.redp.bizimpl.upmp.vo.UpmpPrivilegeCheckVO;
import cc.rengu.redp.common.domain.QueryRequest;
import cc.rengu.redp.common.exception.RedpException;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * @author System
 */
public interface IUpmpPrivilegeCheckService extends IService<UpmpPrivilegeCheck> {

    IPage<UpmpPrivilegeCheckVO> findPageList(UpmpPrivilegeCheckVO privilegeCheck, QueryRequest queryRequest);

    List<UpmpPrivilegeCheck> findList(UpmpPrivilegeCheck privilegeCheck);

    void add(UpmpPrivilegeCheckVO privilegeCheck)throws RedpException;

    void update(UpmpPrivilegeCheckVO privilegeCheck) throws RedpException;

    /**
     * 递归删除菜单/按钮
     *
     * @param menuIds menuIds
     */
    void delete(String[] menuIds) throws Exception;

    /**
     * 查询权限审核配置可选和已选的角色信息
     * @param privilegeCheck
     * @return
     * @throws RedpException
     */
    Map<String, Object> getPrivilegeCheckRoles(UpmpPrivilegeCheckVO privilegeCheck)throws RedpException;

    UpmpPrivilegeCheck getPrivilegeCheckByPrivilegeCode(String instId, String perms);
}
